<?php
use Common\Utils\WeChatUtils;

require_once './Application/Common/Utils/WeChatUtils.class.php';
$wechat = new WeChatUtils('wx3bd00ee66888a243','dedad9e1e43bd2b527bade0e0f0b9fc5','wfjj');
//$result = $we_chat->createMenu($menu);
$menu = <<<JSON
{


    "button": [
        {	
          "type":"view",
          "name":"立即报名",
          "url":"http://www.weifengyouxuan.com"
        },
        {	
          "type":"view",
          "name":"参加比赛",
          "url":"http://www.weifengyouxuan.com"
        },
        {
                "name": "关于平台", 
                "sub_button": [
                    {
                        "type": "view", 
                        "name": "规则介绍", 
                        "url": "http://www.weifengyouxuan.com/index.php/Home/WeChat/aboutUs"
                    }, 
                    {
                        "type": "click", 
                        "name": "平台充值", 
                        "key": "recharge_click"
                    }
                ]
            }
        
       
    ]
    
}
JSON;
$wechat->deleteMenu();
$result = $wechat->createMenu($menu);
var_dump($result);
//phpinfo();